#include "PDTStatement.h"
#include "PDTCodeGraph.h"

PDTStatement::PDTStatement(PDTCodeGraph & CG) :
  PDTNode(CG), depth(0)
{
}

void
PDTStatement::incrementDepth()
{
  depth++;
  incrementChildrenDepth();
}

void
PDTStatement::incrementChildrenDepth()
{
  vector<PDTNode*> & children = getChildren();
  for (unsigned int i = 0; i < children.size(); i++)
    {
      PDTNode * child = children[i];
      child->incrementDepth();
    }
}

PDTNilStatement PDTNilStatement::nil;
